<?php 
$res = $this->res;
echo '
<div class="greengrocer">
	<table>
		<tr>
			<td class="greengrocer_top">
				<img class="greengrocer_pic" src="'.$res->logo.'" style="width:60px;height:60px;">
			</td>
			<td class="td_bottom">
				<div class="td_div1">店主：'.$res->contact.'</div>
				<div>'.$res->clientname.'</div>
			</td>
		</tr>
	</table>
</div>';
?>
<div class="ap_title">订单评价</div>
		<div class="star1lfet">新鲜度</div>
		<div class="star1right">
		<div id="star1"></div>
		<div id="result1"></div>
		</div>
		<div class="clear"></div>
	<!--star end-->
		<span class="star2lfet">送达速度</span>
		<div class="star2right">
		<div id="star2"></div>
		<div id="result2"></div>
		</div>
		<div class="clear"></div>
		<!--star end-->
		<span class="star3lfet">价格</span>
		<div class="star3right">
		<div id="star3"></div>
		<div id="result3"></div>
		</div>
		<div class="clear"></div>
		<!--star end-->
		<span class="star4lfet">服务态度</span>
		<div class="star4right">
		<div id="star4"></div>
		<div id="result4"></div>
		</div>
		<div class="clear"></div>
	<!--star end-->
<form action="/order/appraise" method="post">
	<input type="hidden" id="scor1" name="freshScore" value="5">
	<input type="hidden" id="scor2" name="sendScore" value="5">
	<input type="hidden" id="scor3" name="priceScore" value="5">
	<input type="hidden" id="scor4" name="serviceScore" value="5">
	<input type="hidden" name="orderid" value="<?php echo $this->orderid;?>">
	<input type="hidden" name="shopid" value="<?php echo $this->shopid;?>">
	
	<textarea class="ap_remark" name="remark" placeholder="请输入您要评价的具体内容！"></textarea>
	<input type="submit" value="提交评论" class="cp_btn" style="border:0px;">
</form>


<script type="text/javascript">
rat('star1','result1','scor1',1);
rat('star2','result2','scor2',1);
rat('star3','result3','scor3',1);
rat('star4','result4','scor4',1);
function rat(star,result,scor,m){

	star= '#' + star;
	result= '#' + result;
	scor = '#'+scor;
	$(result).hide();//将结果DIV隐藏

	$(star).raty({
		hints: ['10','20', '30', '40', '50','60', '70', '80', '90', '100'],
		path: "/images",
		starOff: 'star-off-big.png',
		starOn: 'star-on-big.png',
		size: 24,
		start: 40,
		showHalf: true,
		target: result,
		targetKeep : true,//targetKeep 属性设置为true，用户的选择值才会被保持在目标DIV中，否则只是鼠标悬停时有值，而鼠标离开后这个值就会消失
		click: function (score, evt) {
			//alert('你的评分是'+score*m+'分');
			if($(result).text()>0){
			$(scor).val($(result).text()/10);
			}else{
				$(scor).val(5);
			}
		}
	});

	/*第二种方式可以设置一个隐蔽的HTML元素来保存用户的选择值，然后可以在脚本里面通过jQuery选中这个元素来处理该值。 弹出结果
	var text = $(result).text();
	$('img').click(function () {
		if ($(result).text() != text) {
			alert('你的评分是'+$(result).text()/m+'分');
			alert(result);
			return;
		}
	});*/
}
</script>